home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / arts / artsmodulessynth.idl < prev    next >
Encoding:
Text File  |  2005-09-10  |  6.8 KB  |  302 lines

  1. /*
  2.  
  3.     Copyright (C) 2000-2001 Stefan Westerfeld
  4.                                 stefan@space.twc.de
  5.                   2001-2003 Matthias Kretz
  6.                             kretz@kde.org
  7.                   2002-2003 Arnold Krille
  8.                             arnold@arnoldarts.de
  9.  
  10.      This library is free software; you can redistribute it and/or
  11.      modify it under the terms of the GNU Library General Public
  12.      License as published by the Free Software Foundation; either
  13.      version 2 of the License, or (at your option) any later version.
  14.  
  15.      This library is distributed in the hope that it will be useful,
  16.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  18.      Library General Public License for more details.
  19.  
  20.      You should have received a copy of the GNU Library General Public License
  21.      along with this library; see the file COPYING.LIB.  If not, write to
  22.      the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  23.      Boston, MA 02111-1307, USA.
  24.  
  25. */
  26.  
  27. /*
  28. * DISCLAIMER: The interfaces in artsmodules.idl (and the derived .cc/.h files)
  29. *             DO NOT GUARANTEE BINARY COMPATIBILITY YET.
  30. *
  31. * They are intended for developers. You shouldn't expect that applications in
  32. * binary form will be fully compatibile with further releases of these
  33. * interfaces.
  34. */
  35.  
  36. #include <artsflow.idl>
  37. #include <artsmidi.idl>
  38.  
  39. module Arts {
  40.  
  41. // Arithmetic & Mixing
  42.  
  43. /**
  44.  * Divides two audio streams
  45.  */
  46. interface Synth_DIV : SynthModule {
  47.     in audio stream invalue1,invalue2;
  48.     out audio stream outvalue;
  49.     default invalue1, invalue2;
  50. };
  51.  
  52. interface Synth_XFADE : SynthModule {
  53.     in audio stream invalue1,invalue2,percentage;
  54.     out audio stream outvalue;
  55. };
  56.  
  57. interface Synth_AUTOPANNER : SynthModule {
  58.     in audio stream invalue, inlfo;
  59.     out audio stream outvalue1, outvalue2;
  60. };
  61.  
  62. // Delays
  63.  
  64. interface Synth_DELAY : SynthModule {
  65.     attribute float maxdelay;
  66.     in audio stream invalue, time;
  67.     out audio stream outvalue;
  68. };
  69.  
  70. interface Synth_CDELAY : SynthModule {
  71.     attribute float time;
  72.     in audio stream invalue;
  73.     out audio stream outvalue;
  74. };
  75.  
  76. // Envelopes
  77.  
  78. interface Synth_ENVELOPE_ADSR : SynthModule {
  79.     in audio stream active,invalue,attack,decay,sustain,release;
  80.     out audio stream outvalue,done;
  81. };
  82.  
  83. interface Synth_PSCALE : SynthModule {
  84.     attribute float top;
  85.     in audio stream invalue, pos;
  86.     out audio stream outvalue;
  87. };
  88.  
  89. // Effects
  90.  
  91. interface Synth_TREMOLO : SynthModule {
  92.     in audio stream invalue, inlfo;
  93.     out audio stream outvalue;
  94. };
  95.  
  96. interface Synth_FX_CFLANGER : SynthModule {
  97.     attribute float mintime, maxtime;
  98.     in audio stream invalue, lfo;
  99.     out audio stream outvalue;
  100. };
  101.  
  102. interface Synth_COMPRESSOR : SynthModule {
  103.     attribute float attack, release, threshold, ratio, output;
  104.     in audio stream invalue;
  105.     out audio stream outvalue;
  106. };
  107.  
  108. // Filters
  109.  
  110. interface Synth_PITCH_SHIFT : SynthModule {
  111.     attribute float speed, frequency;
  112.     in audio stream invalue;
  113.     out audio stream outvalue;
  114. };
  115.  
  116. interface Synth_PITCH_SHIFT_FFT : SynthModule {
  117.     attribute float speed, scaleFactor;
  118.     attribute long frameSize, oversample;
  119.     in audio stream inStream;
  120.     out audio stream outStream;
  121. };
  122.  
  123. interface Synth_SHELVE_CUTOFF : SynthModule {
  124.     in audio stream invalue,frequency;
  125.     out audio stream outvalue;
  126. };
  127.  
  128. interface Synth_BRICKWALL_LIMITER : SynthModule {
  129.     in audio stream invalue;
  130.     out audio stream outvalue;
  131. };
  132.  
  133. interface Synth_STD_EQUALIZER : SynthModule {
  134.     attribute float low, mid, high, frequency, q;
  135.     in audio stream invalue;
  136.     out audio stream outvalue;
  137. };
  138.  
  139. interface Synth_RC : SynthModule {
  140.     attribute float b, f;
  141.     in audio stream invalue;
  142.     out audio stream outvalue;
  143. };
  144.  
  145. interface Synth_MOOG_VCF : SynthModule {
  146.     attribute float frequency, resonance;
  147.     in audio stream invalue;
  148.     out audio stream outvalue;
  149. };
  150.  
  151. interface Synth_ATAN_SATURATE : SynthModule {
  152.     attribute float inscale;
  153.     in audio stream invalue;
  154.     out audio stream outvalue;
  155. };
  156.  
  157. // Midi + Sequencing
  158.  
  159. interface Synth_MIDI_TEST : SynthModule, MidiPort {
  160.     attribute string filename;
  161.     attribute string busname;
  162. };
  163.  
  164. interface Synth_SEQUENCE : SynthModule {
  165.     attribute float speed;
  166.     attribute string seq;
  167.     out audio stream frequency, pos;
  168. };
  169.  
  170. interface Synth_SEQUENCE_FREQ : SynthModule {
  171.     attribute float speed;
  172.     attribute string seq;
  173.     out audio stream frequency, pos;
  174. };
  175.  
  176. // Oscillation & Modulation
  177.  
  178. interface Synth_FM_SOURCE : SynthModule {
  179.     in audio stream frequency, modulator, modlevel;
  180.     out audio stream pos;
  181. };
  182.  
  183. // Waveforms
  184.  
  185. interface Synth_WAVE_TRI : SynthModule {
  186.     in audio stream pos;
  187.     out audio stream outvalue;
  188. };
  189.  
  190. interface Synth_NOISE : SynthModule {
  191.     out audio stream outvalue;
  192. };
  193.  
  194. interface Synth_WAVE_SQUARE : SynthModule {
  195.     in audio stream pos;
  196.     out audio stream outvalue;
  197. };
  198.  
  199. interface Synth_WAVE_SOFTSAW : SynthModule {
  200.     in audio stream pos;
  201.     out audio stream outvalue;
  202. };
  203.  
  204. interface Synth_WAVE_PULSE : SynthModule {
  205.     attribute float dutycycle;
  206.     in audio stream pos;
  207.     out audio stream outvalue;
  208. };
  209.  
  210. enum SynthOscWaveForm {
  211.     soWaveSine,
  212.     soWaveTriangle,
  213.     soWaveSawRise,
  214.     soWaveSawFall,
  215.     soWavePeakRise,
  216.     soWavePeakFall,
  217.     soWaveMoogSaw,
  218.     soWaveSquare,
  219.     soWavePulseSaw
  220. };
  221.  
  222. interface Synth_OSC : SynthModule {
  223.     /* streams */
  224.     in audio stream infrequency, modulation, inpwm, insync;
  225.     out audio stream outvalue, outsync;
  226.  
  227.     attribute SynthOscWaveForm waveForm;
  228.  
  229.     /* FM */
  230.     attribute boolean fmExponential;
  231.     attribute float fmStrength;
  232.     attribute float fmSelfStrength;
  233.  
  234.     /* phase, frequency, fineTune */
  235.     attribute float phase;
  236.     attribute float frequency;
  237.     attribute long fineTune;
  238.  
  239.     /* pulse width */
  240.     attribute float pulseWidth;
  241.     attribute float pulseModStrength;
  242. };
  243.  
  244. interface Synth_PLAY_PAT : SynthModule {
  245.     attribute string filename;
  246.     in audio stream frequency;
  247.     out audio stream outvalue;
  248. };
  249.  
  250. // Others
  251.  
  252. /**
  253.  * this interface currently has probably a problem - usually, if you are
  254.  * using such a module, you would expect that you can specify the filename
  255.  * with it - BUT, if you allow this, then any instrument definition file
  256.  * (.arts) and similar might overwrite every file the user can access, which
  257.  * might not be what you want, so I currently save it to a file in
  258.  * /tmp/mcop-<username>/<filename>.wav (which might be unlucky since the user
  259.  * might not have too much space there)
  260.  */
  261. interface Synth_CAPTURE_WAV : SynthModule {
  262.     attribute string filename;
  263.     default in audio stream left, right;
  264. };
  265.  
  266. // Tests
  267.  
  268. interface Synth_NIL : SynthModule {
  269. };
  270.  
  271. interface Synth_DEBUG : SynthModule {
  272.     attribute string comment;
  273.     in audio stream invalue;
  274. };
  275.  
  276. interface Synth_DATA : SynthModule {
  277.     attribute float value;
  278.     out audio stream outvalue;
  279. };
  280.  
  281. interface Synth_MIDI_DEBUG : SynthModule, MidiPort {
  282. };
  283.  
  284. // EXPERIMENTAL MIDI
  285. interface ObjectCache {
  286.     void put(object obj, string name);
  287.     object get(string name);
  288. };
  289.  
  290. interface MidiReleaseHelper : SynthModule {
  291.     attribute SynthModule voice;
  292.     attribute string name;
  293.     attribute ObjectCache cache;
  294.  
  295.     boolean terminate();
  296.     in audio stream done;
  297. };
  298. // END EXPERIMENTAL MIDI
  299.  
  300. };
  301.  
  302.